<template>
    <div class="build-highlight">
        <el-select v-model="value" placeholder="Select" style="width: 240px" @change="handleSelectChange">
            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
        </el-select>
    </div>
</template>

<script setup lang="ts">
import { onMounted, ref } from "vue";
import { getMyProjectManager } from "@/getMyProjectManager";
import { viewType } from "@/sctipts/dataTypes";
const myProjectManager = getMyProjectManager()
const value = ref('')
const options = [
    {
        label: '显示-全部楼层',
        value: 'all',
        view: {
            "position": [
                114.04293905847207,
                38.06645646966434,
                380.9108412987498
            ] as [number, number, number],
            "rotation": [
                349.27484130859375,
                -38.808353424072266,
                -4.081576487110616e-15
            ] as [number, number, number]
        }
    }, {
        label: '显示-综合楼1层',
        value: 'floor_zonghelou_1',
        view: {
            "position": [
                114.04262401378925,
                38.067107395657374,
                356.15311211545867
            ] as [number, number, number],
            "rotation": [
                3.7252120971679688,
                -70.75286865234375,
                0.000008509478902851697
            ] as [number, number, number]
        }
    }, {
        label: '显示-综合楼2层',
        value: 'floor_zonghelou_2',
        view: {
            "position": [
                114.04262401378925,
                38.067107395657374,
                360.15311211545867
            ] as [number, number, number],
            "rotation": [
                3.7252120971679688,
                -70.75286865234375,
                0.000008509478902851697
            ] as [number, number, number]
        }
    }, {
        label: '显示-综合楼3层',
        value: 'floor_zonghelou_3',
        view: {
            "position": [
                114.04262401378925,
                38.067107395657374,
                364.15311211545867
            ] as [number, number, number],
            "rotation": [
                3.7252120971679688,
                -70.75286865234375,
                0.000008509478902851697
            ] as [number, number, number]
        }
    }, {
        label: '显示-综合楼4层',
        value: 'floor_zonghelou_4',
        view: {
            "position": [
                114.04262401378925,
                38.067107395657374,
                368.15311211545867
            ] as [number, number, number],
            "rotation": [
                3.7252120971679688,
                -70.75286865234375,
                0.000008509478902851697
            ] as [number, number, number]
        }
    }, {
        label: '显示-综合楼5层',
        value: 'floor_zonghelou_5',
        view: {
            "position": [
                114.04262401378925,
                38.067107395657374,
                372.15311211545867
            ] as [number, number, number],
            "rotation": [
                3.7252120971679688,
                -70.75286865234375,
                0.000008509478902851697
            ] as [number, number, number]
        }
    }, {
        label: '显示-综合楼6层',
        value: 'floor_zonghelou_6',
        view: {
            "position": [
                114.04262401378925,
                38.067107395657374,
                376.15311211545867
            ] as [number, number, number],
            "rotation": [
                3.7252120971679688,
                -70.75286865234375,
                0.000008509478902851697
            ] as [number, number, number]
        }
    }, {
        label: '显示-综合楼顶层',
        value: 'floor_zonghelou_7',
        view: {
            "position": [
                114.04262401378925,
                38.067107395657374,
                380.15311211545867
            ] as [number, number, number],
            "rotation": [
                3.7252120971679688,
                -70.75286865234375,
                0.000008509478902851697
            ] as [number, number, number]
        }
    }, {
        label: '显示-餐厅1层',
        value: 'floor_canting_1',
        view: {
            "position": [
                114.0429537854672,
                38.06775888994002,
                325.2380013133062
            ] as [number, number, number],
            "rotation": [
                5.646759033203125,
                -61.265716552734375,
                0.00003711675162776373
            ] as [number, number, number]
        }
    }, {
        label: '显示-餐厅2层',
        value: 'floor_canting_2',
        view: {
            "position": [
                114.0429537854672,
                38.06775888994002,
                329.2380013133062
            ] as [number, number, number],
            "rotation": [
                5.646759033203125,
                -61.265716552734375,
                0.00003711675162776373
            ] as [number, number, number]
        }
    }, {
        label: '显示-餐厅3层',
        value: 'floor_canting_3',
        view: {
            "position": [
                114.0429537854672,
                38.06775888994002,
                333.2380013133062
            ] as [number, number, number],
            "rotation": [
                5.646759033203125,
                -61.265716552734375,
                0.00003711675162776373
            ] as [number, number, number]
        }
    }
]

const handleSelectChange = (value: any) => {
    const item = options.find(item => item.value == value)
    if (!item) return
    myProjectManager.buildingCollection.setFloorVisible(item.value, item.view)
}


</script>
<style scoped></style>